import { observable ,computed,action,autorun } from 'mobx'

class AppState {
	@observable count=0;
	@observable max = 5;
	@computed get msg(){
		console.log('msg的getter里执行...')
		return `msg结果===>${this.max>this.count}`
	}
	
	autorun=()=>{
		console.log(`${this.count} 运行运行~`)
	}

	@action add(){
		this.count +=1;
	}
	@action changeName(c){
		this.max=c
	}
}
export default AppState;